package com.pshcp.doctor.tool;

import com.framework.thread.ReqComTool;
import com.framework.util.SystemUtil;
import com.pshcp.doctor.ao.assistantsettings.SaveDoctorAssistantSettingsAO;
import com.pshcp.doctor.vo.assistantsettings.DoctorAssistantSettingsVO;
import com.pshcp.domain.model.DoctorAssistantSettings;

/**
 * @Description: TODO
 * @Author: xiaoche
 * @Date: 2022/11/3 18:04
 */
public class DoctorAssistantSettingsTool {

    public static DoctorAssistantSettingsVO buildGetDoctorAssistantSettingsVO(DoctorAssistantSettings doctorAssistantSettings) {
        DoctorAssistantSettingsVO doctorAssistantSettingsVO = new DoctorAssistantSettingsVO();
        doctorAssistantSettingsVO.setWechat(doctorAssistantSettings == null ? null : doctorAssistantSettingsVO.getWechat());
        doctorAssistantSettingsVO.setPhone(doctorAssistantSettings == null ? null : doctorAssistantSettingsVO.getPhone());
        return doctorAssistantSettingsVO;
    }

    public static DoctorAssistantSettings buildSaveDoctorAssistantSettings(SaveDoctorAssistantSettingsAO saveDoctorAssistantSettingsAO) {
        DoctorAssistantSettings doctorAssistantSettings = new DoctorAssistantSettings();
        doctorAssistantSettings.setDoctorId(ReqComTool.getUserId());
        doctorAssistantSettings.setWechat(saveDoctorAssistantSettingsAO.getWechat());
        doctorAssistantSettings.setPhone(saveDoctorAssistantSettingsAO.getPhone());
        return doctorAssistantSettings;
    }

    public static DoctorAssistantSettings buildSaveDoctorAssistantSettings(DoctorAssistantSettings doctorAssistantSettings, SaveDoctorAssistantSettingsAO saveDoctorAssistantSettingsAO) {
        doctorAssistantSettings.setWechat(saveDoctorAssistantSettingsAO.getWechat());
        doctorAssistantSettings.setPhone(saveDoctorAssistantSettingsAO.getPhone());
        return doctorAssistantSettings;
    }

}
